package web

import "ksd-social-api/modules/user/model/context"

/**
 * 我的专题
 * @author feige
 * @date 2023-12-14
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) FindMySpecialPage() {
	userCenterContext := context.UserCenterContext{}
	web.BindJSON(&userCenterContext)
	userCenterContext.UserId = web.GetUserId()
	userCenterContext.SystemId = web.GetSystemId()
	p := userCenterService.FindMySpecialPage(userCenterContext)
	web.Ok(p)
}

/**
 * 收藏专题
 * @author feige
 * @date 2023-12-14
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) FindSpecialUserFavPage() {
	userCenterContext := context.UserCenterContext{}
	web.BindJSON(&userCenterContext)
	userCenterContext.UserId = web.GetUserId()
	userCenterContext.SystemId = web.GetSystemId()
	p := userCenterService.FindSpecialUserFavPage(userCenterContext)
	web.Ok(p)
}

/**
 * 点赞专题
 * @author feige
 * @date 2023-12-14
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) FindSpecialUserLikePage() {
	userCenterContext := context.UserCenterContext{}
	web.BindJSON(&userCenterContext)
	userCenterContext.UserId = web.GetUserId()
	userCenterContext.SystemId = web.GetSystemId()
	p := userCenterService.FindSpecialUserLikePage(userCenterContext)
	web.Ok(p)
}

/**
 * 足迹专题
 * @author feige
 * @date 2023-12-14
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) FindMySpecialsBroswerPage() {
	userCenterContext := context.UserCenterContext{}
	web.BindJSON(&userCenterContext)
	userCenterContext.UserId = web.GetUserId()
	userCenterContext.SystemId = web.GetSystemId()
	p := userCenterService.FindMySpecialBroswerPage(userCenterContext)
	web.Ok(p)
}

/**
 * 取消专题收藏
 * @author feige
 * @date 2024-01-13
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) CancelFavSpecial() {
	courseId, _ := web.GetUint64("id")
	web.Ok(userCenterService.CancelFavSpecial(web.GetUserId(), courseId, web.GetSystemId()))
}

/**
 * 取消专题点赞
 * @author feige
 * @date 2024-01-13
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) CanceLikeSpecial() {
	courseId, _ := web.GetUint64("id")
	web.Ok(userCenterService.CanceLikeSpecial(web.GetUserId(), courseId, web.GetSystemId()))
}

/**
 * 删除专题浏览记录
 * @author feige
 * @date 2024-01-13
 * @version 1.0
 * @desc
 */
func (web *UserCenterController) RemoveSpecialHits() {
	courseId, _ := web.GetUint64("id")
	web.Ok(userCenterService.RemoveSpecialHits(web.GetUserId(), courseId, web.GetSystemId()))
}
